package com.yy.ant.chat.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.yy.ant.sys.entity.User;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 加群消息
 * </p>
 *
 * @author liyingying
 * @since 2020-01-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("chat_message")
public class Message implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 内容
     */
    private String content;

    /**
     * 发送给谁
     */
    private Long uid;

    /**
     * 谁发的
     */
    private Long froms;
    @TableField(exist=false)
    private Long from=froms;
    /**
     * 分组ID
     */
    private Integer fromGroup;

    /**
     * 1.请求加好友.  2.已拒绝  3.已同意 ,4.请求加群
     */
    private Integer types;
    @TableField(exist=false)
	private Integer type=types;//发送人信息
    /**
     * 附带留言
     */
    private String remark;

    /**
     * 未知意义
     */
    private String href;
    
    
    private Integer reada;
    /**
     * 是否已读 1.已读. 0.未读
     */
    @TableField(exist=false)
    private Integer read=reada;

   
    /**
     * 时间
     */
    
    private LocalDateTime timea;
    @TableField(exist=false)
    private LocalDateTime time=timea;
    
    
    @TableField(exist=false)
	private User user;//发送人信息
}
